package com.neusoft.util;

import org.checkerframework.checker.units.qual.C;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class CommonUtil {
    public static String getNow(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar now = Calendar.getInstance();
        return sdf.format(now.getTime());
    }

    public static String getNowToExpire(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar expire = Calendar.getInstance();
        expire.add(Calendar.DAY_OF_MONTH,+90);
        return sdf.format(expire.getTime());
    }
}
